home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-01 / jjbqc.zip / JJBSHOW3.C < prev    next >
C/C++ Source or Header  |  1993-01-04  |  5KB  |  122 lines

  1.  
  2.  
  3.  
  4.  
  5. /***************************************************************************
  6.  *                                                                         *
  7.  *                           JJBSHOW3.C                                    *
  8.  *                                                                         *
  9.  *   Copyright (c) 1989, JJB. All rights reserved.                         *
  10.  *                                                                         *
  11.  *                                                                         *
  12.  *   This example shows you how to assign functions for initalizing and    *
  13.  *   leaving groups and options.                                           *
  14.  *                                                                         *
  15.  *                  'init(functionname)'                                   *
  16.  *                  'leave(functionname)'                                  *
  17.  *                                                                         *
  18.  *   Just glance and it and move on to example JJBSHOW3.C                  *
  19.  *                                                                         *
  20.  *   If you want to run this program, from DOS:                            *
  21.  *                                                                         *
  22.  *         Enter 'JJBS3'    ( to load this file with JJB.QLB)              *
  23.  *         Press 'F5'       ( to compile and begin executing)              *
  24.  *                                                                         *
  25.  *    If you have any problems, see JJBREAD.ME 'problems'.                 *
  26.  *    Otherwise you should be executing this program.                      *
  27.  *                                                                         *
  28.  *    You may press 'ALT' then select any option.                          *
  29.  *    The option selected will be displayed in the bottom left of screen.  *
  30.  *                                                                         *
  31.  *     JJB, 9236 church Rd suite 1082, Dallas, Tx 75231 (214) 341-1635     *
  32.  ***************************************************************************/
  33.  
  34.  
  35. /***************************************************************************
  36.  *                                                                         *
  37.  * To make an .exe file JJBSHOW3.EXE for this program, from DOS enter:     *
  38.  *                                                                         *
  39.  *     QCL  /c  /AM  JJBSHOW3.C                                            *
  40.  *     LINK  JJBSHOW3.OBJ + JJB.OBJ,,, C:LIB\,                             *
  41.  *                                                                         *
  42.  ***************************************************************************/
  43.  
  44.  
  45. /* see JJBGLOSS.DOC for an explanation of the JJB functions below       */
  46.  
  47.  
  48. main()
  49.   {
  50.     jjb_initalize();        /* initalizes JJB   */
  51.  
  52.     jjb_setup();            /* setup options & assign functions     */
  53.  
  54.     jjb_start();            /* start executing the default option   */
  55.  
  56.  
  57.   }
  58.  
  59.  
  60. /* The function below uses some of the functions in the JJB hidden library.*/
  61.  
  62. video_message() {
  63.     vloc(10,20);     /* position the video fast cursor */
  64.     vfsc("This message will appear on the screen.");
  65.     get_ch();
  66.    }
  67.  
  68. init_update() {
  69.     /* you can place any C functions here to initalize the group. */
  70.    }
  71.  
  72. leave_update() {
  73.        /* you can place any C functions here to leave the group. */
  74.  
  75.    }
  76.  
  77. init_vid_msg() {
  78.     /* you can place any functions here to initalize an option.*/
  79.     vloc(4,55); vfs("initalize message, etc.");
  80.    }
  81.  
  82. leave_vid_msg() {
  83.     /* you can place any functions here to leave an option.*/
  84.    }
  85.  
  86.  
  87.  
  88.  
  89. /****************************************************************************
  90.  *                                                                          *
  91.  *                       jjb_setup()                                        *
  92.  *                                                                          *
  93.  *   jjb_setup() is where you should define how your pull down menus will   *
  94.  *   for each group and option.                                             *
  95.  *                                                                          *
  96.  *   This example shows you how to initialize and leave groups and options. *
  97.  *                                                                          *
  98.  *   initalizing and leaving functions for groups and options are not       *
  99.  *   required. They are optional and to be used only if you need them.      *
  100.  *                                                                          *
  101.  ****************************************************************************/
  102.  
  103.  
  104. jjb_setup() {
  105.  
  106.     group("Update");
  107.         init(init_update);
  108.         leave(leave_update);
  109.  
  110.        option("Video a message on the screen");
  111.           funct(video_message);
  112.           init(init_vid_msg);
  113.           leave(leave_vid_msg);
  114.  
  115.        option("Update Customer file");
  116.  
  117.     }
  118.  
  119.  
  120.  
  121.  
  122.